<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Models\MeetingActivityEnroll
 *
 * @property int $id 主键
 * @property int $activity_id 关联活动
 * @property string|null $name 姓名
 * @property string|null $tel 电话
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \App\Models\MeetingActivity $activity
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereActivityId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereTel($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\MeetingActivityEnroll whereUpdatedAt($value)
 * @mixin \Eloquent
 */
class MeetingActivityEnroll extends Model
{
    protected $table = 'meeting_activity_enroll';
    protected $primaryKey = 'id';
    protected $fillable = ['activity_id', 'name', 'tel'];

    public function activity()
    {
        return $this->belongsTo(MeetingActivity::class, 'activity_id', 'id');
    }
}
